package com.zlsy.thread.singleton;

/**
 * @author zhouliang
 * @date 2020/5/8 20:39
 * <p>
 * 饿汉式（静态代码块）-可用
 */
public class Singleton2 {

    private final static Singleton2 INSTANCE;

    static {
        INSTANCE = new Singleton2();
    }

    private Singleton2() {
    }

    public static Singleton2 getInstance() {
        return INSTANCE;
    }
}
